Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: e2e tests (#1193) #1338

Merged
merged 10 commits into from
Apr 29, 2022
Merged

backport: e2e tests (#1193) #1338

merged 10 commits into from
Apr 29, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Apr 24, 2022

Closes: #XXX

What is the purpose of the change

This is a part of the e2e upgrade test plan #1235 . Currently, this is blocked until #1332 is merged on main and added to this PR

We need to backport the entire e2e test suite to v7.x so that we can build an image for initializing configs and geneses from the v7.x branch and be able to test the upgrade from v7.x to v8

Several e2e test commits are combined into one PR here to help ease the review process. No need to review in detail as this has already been done on the main branch, only a skim is desired.

Brief change log

The backport includes:

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

* create e2e image and a makefile step to build

* progress

* e2e tests in ci

* use root distroless image and correct volume path

* remove chain b references

* implement query balances

* implement TestQueryBalances

* trigger worflow

* trigger

* test-e2e Makefile step

* fmt and sleep if service unavailable

* README

* restore branches

* add changelog entry

* exclude e2e from regular tests

* -E flag for grep exclusion

* grep

* go mod tidy --compat=1.17

* manually tidy go.mod
@p0mvn p0mvn force-pushed the roman/backport-e2e branch from fa92449 to 74609cf Compare April 24, 2022 18:42
@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2022

Codecov Report

Merging #1338 (c32c5b3) into v7.x (17afb0b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             v7.x    #1338   +/-   ##
=======================================
  Coverage   20.63%   20.63%           
=======================================
  Files         199      199           
  Lines       25803    25803           
=======================================
  Hits         5325     5325           
  Misses      19509    19509           
  Partials      969      969           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17afb0b...c32c5b3. Read the comment docs.

@p0mvn p0mvn force-pushed the roman/backport-e2e branch from 278ca45 to b80433c Compare April 24, 2022 19:00
czarcas7ic and others added 4 commits April 24, 2022 15:10
* second chain with tests

* add hermes, comment out balance query for now

* eventually

* Update Makefile

Co-authored-by: Roman <[email protected]>

* remove gas fees and unused functions

* readded check

* Nicco changes to own hermes image

* Remove unused hermes.Dockerfile

* Use a single Dockerfile for both debug and official image

* readd build hermes in makefile

* remove hermes

* Set correct golang image and use correct debug image tag

Co-authored-by: Adam Tucker <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: Niccolo Raspa <[email protected]>
* cleanup makefile and ci workflows

* update changelog

* fix sim test

* fix makefile and rename docker repo
@p0mvn p0mvn added T:tests and removed T:tests labels Apr 24, 2022
p0mvn and others added 4 commits April 24, 2022 15:25
)

* begin modularizing e2e test in preparation for upgrade

* rename common package to util

* move chain related constants from util to chain package

* fix genesis.go

* exctract initNodes into the genesis package

* remove genesis package, move all logic to chain

* continue cleaning up chain package and refactoring e2e

* store chains in a slice

* reuse common cdc from util package

* lexicographical reorder of functions in config.go of chain package

* clean up names
Closes: #XXX

## What is the purpose of the change

This is a follow-up PR to #1293 and builds upon its work. It is part of the e2e test chain upgrade epic #1235 

This PR introduces the ability to run chain initialization in a Docker container by running the following:
```
docker run -v < path >:/tmp/osmo-test osmosis-e2e-chain-init:debug --data-dir=/tmp/osmo-test
```
All chain data is placed at the given `< path >` that is mounted as a volume on the container. In addition, this PR introduces documentation about the current state of the e2e tests. 

## Brief change log

- [pull chain temp folder creation our of chain to e2e package](c175289)
- [create image and makefile steps to initialize chain state](de89119)
- [allow for running the upgrade initialization in Docker by providing a data dir](dabb683)
- [improve abstractions for chain initialization and add README](cf0d8a3)
- improve README

## Testing and Verifying

- ran e2e tests locally a few times
- `make build-e2e-chain-init`
- `make docker-build-e2e-chain-init`
- `docker run -v /home/roman/cosmos/osmosis/tmp:/tmp/osmo-test osmosis-e2e-chain-init:debug --data-dir=/tmp/osmo-test`

All steps worked as desired

## Documentation and Release Note

  - Does this pull request introduce a new feature or user-facing behavior changes? no
  - Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? no
  - How is the feature or change documented? improved `tests/e2e/README.md`

## Next Steps

The next step is to switch our chain initialization logic in `func (s *IntegrationTestSuite) configureChain(chainId string)` to use Dockertest and the newly introduced container. Then, mount the genesis and configs on the Osmosis containers, against which the e2e tests are executed
* create e2e image and a makefile step to build

* progress

* e2e tests in ci

* use root distroless image and correct volume path

* remove chain b references

* implement query balances

* implement TestQueryBalances

* trigger worflow

* trigger

* test-e2e Makefile step

* fmt and sleep if service unavailable

* README

* restore branches

* add changelog entry

* exclude e2e from regular tests

* -E flag for grep exclusion

* grep

* go mod tidy --compat=1.17

* manually tidy go.mod
@czarcas7ic czarcas7ic self-requested a review April 29, 2022 18:01
@p0mvn p0mvn marked this pull request as ready for review April 29, 2022 18:13
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, merging and then working on #1333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants